 var id = getvl("id");

 $(function(){
 	   if(id!=null){
 	   	  wodeyuechakan(id);
 	   }else{
 	   	alert("登录异常...");
 	   }
 });
 
 var currentPage=1;
 var currentPage2=1;
 var currentPage3=1;


      var ss=0;
       var ss2=0;
        var ss3=0;
 function wodeyuechakan(){
       if(currentPage==1 || currentPage==2 || ss!=0){
       	    ss2=0;
       ss3=0;
       currentPage2=1;
     currentPage3=1;
           $("#dianpuxinxi2").html("");
      $("#dianpuxinxi3").html("");
          			$.ajax({
 url: urlcore + "/api/cashRecord/selectUserMoneyDetails2?current="+currentPage+"&type=6&userId="+id,
			type: "get",
			dataType: 'json',
			contentType: "application/json;charset=utf-8",
			success: function(data) {
				if(data.success == true) {
				
					ss=data.data.length;
					$.each(data.data, function(y,n) {
					
					 var dianpuxinxi='<dd class="clearfix">'+
'    			<div class="yue_list_left">'+
'    				<h5>'+n.title+'</h5>'+
'    				<span>'+n.gmtDatetime+'</span>'+
'    			</div>';
                     if(n.recoedType==1){
            dianpuxinxi+='<div class="yue_list_right">+&yen;'+n.money+'</div>';
                     }else{
               dianpuxinxi+='<div class="yue_list_right">-&yen;'+n.money+'</div>';         	
                     }
          dianpuxinxi+='</dd>';
                       $("#dianpuxinxi").append(dianpuxinxi);
					/*$.each(w.records, function(q,n) {
						});
					*/
					});
					  
				} else if(data.code == 'OVERTIME') {
					var thisUrl = window.location.href;
					alert(thisUrl);
					if(thisUrl.indexOf('1.0.0denglu.html') <= -1) {
						top.window.location.href = "1.0.0denglu.html";
					}
				} else {
					if(data.msg != '空数据') {
						alert(data.msg)
					} else {
						$('#thiscount').text(0);
					}
				}

			},
			error: function() {
				alert("error");
			}
		});

          	}
	
 }



 function wodeyuechakan2(){
       if(currentPage2==1 || currentPage2==2 || ss2!=0){
       	    ss=0;
       ss3=0;
       currentPage=1;
     currentPage3=1;
           $("#dianpuxinxi").html("");
      $("#dianpuxinxi3").html("");
          			$.ajax({
 url: urlcore + "/api/cashRecord/selectUserMoneyDetails2?current="+currentPage2+"&type=1&userId="+id,
			type: "get",
			dataType: 'json',
			contentType: "application/json;charset=utf-8",
			success: function(data) {
				if(data.success == true) {
					ss2=data.data.length;
					$.each(data.data, function(y,n) {
					
					 var dianpuxinxi='<dd class="clearfix">'+
'    			<div class="yue_list_left">'+
'    				<h5>'+n.title+'</h5>'+
'    				<span>'+n.gmtDatetime+'</span>'+
'    			</div>';
                     if(n.recoedType==1){
            dianpuxinxi+='<div class="yue_list_right">+&yen;'+n.money+'</div>';
                     }else{
               dianpuxinxi+='<div class="yue_list_right">-&yen;'+n.money+'</div>';         	
                     }
          dianpuxinxi+='</dd>';
                       $("#dianpuxinxi2").append(dianpuxinxi);
					/*$.each(w.records, function(q,n) {
						});
					*/
					});
					  
				} else if(data.code == 'OVERTIME') {
					var thisUrl = window.location.href;
					alert(thisUrl);
					if(thisUrl.indexOf('1.0.0denglu.html') <= -1) {
						top.window.location.href = "1.0.0denglu.html";
					}
				} else {
					if(data.msg != '空数据') {
						alert(data.msg)
					} else {
						$('#thiscount').text(0);
					}
				}

			},
			error: function() {
				alert("error");
			}
		});

          	}
	
 }
 
 
 
 function wodeyuechakan3(){
       if(currentPage3==1 || currentPage3==2 || ss3!=0){
       	 ss2=0;
       ss=0;
       currentPage=1;
     currentPage2=1;
           $("#dianpuxinxi").html("");
      $("#dianpuxinxi2").html("");
          			$.ajax({
 url: urlcore + "/api/cashRecord/selectUserMoneyDetails2?current="+currentPage3+"&type=2&userId="+id,
			type: "get",
			dataType: 'json',
			contentType: "application/json;charset=utf-8",
			success: function(data) {
				if(data.success == true) {
					ss3=data.data.length;
					$.each(data.data, function(y,n) {
					
					 var dianpuxinxi='<dd class="clearfix">'+
'    			<div class="yue_list_left">'+
'    				<h5>'+n.title+'</h5>'+
'    				<span>'+n.gmtDatetime+'</span>'+
'    			</div>';
                     if(n.recoedType==1){
            dianpuxinxi+='<div class="yue_list_right">+&yen;'+n.money+'</div>';
                     }else{
               dianpuxinxi+='<div class="yue_list_right">-&yen;'+n.money+'</div>';         	
                     }
          dianpuxinxi+='</dd>';
                       $("#dianpuxinxi3").append(dianpuxinxi);
					/*$.each(w.records, function(q,n) {
						});
					*/
					});
					  
				} else if(data.code == 'OVERTIME') {
					var thisUrl = window.location.href;
					alert(thisUrl);
					if(thisUrl.indexOf('1.0.0denglu.html') <= -1) {
						top.window.location.href = "1.0.0denglu.html";
					}
				} else {
					if(data.msg != '空数据') {
						alert(data.msg)
					} else {
						$('#thiscount').text(0);
					}
				}

			},
			error: function() {
				alert("error");
			}
		});

          	}
	
 }

